
/**************************************************************************************************************

 README

\/**************************************************************************************************************

Replication codes for:
Countercyclical Liquidity Policy and Credit Cycles: Evidence from Macroprudential and Monetary Policy in Brazil 
(published at the Review of Corporate Finance Studies)

author: Rodrigo Barbone Gonzalez

date: 18 January 2024
***************************************************************************************************************/

***************************************************************************************************************** 
/* IMPORTANT: The original data is proprietary, confidential and belongs to the Central Bank of Brazil (BCB). 
The codes in this package run on available PSEUDO DATA. Because data is random, the outputs generated in the code 
WILL NOT be the same found in the paper's tables. */
*****************************************************************************************************************

******************************************************************************************************************
/* Note on DATA access

While the DATA in this paper is not publicly available, the BCB offers researchers the possibility of teaming up,
under strict guidelines, to develop research papers with its proprietary DATA, including the one used in this 
manuscript.
 
Data access requires a cooperation agreement. All steps to celebrate this agreement are detailed in the link below,

https://www.bcb.gov.br/en/publications/externalcollaborationresearch, 

including a form for project submission. The collaboration includes strict "confidential agreements" with respect 
to DATA access and usage. 
  
The handling of the raw DATA must be carried by Central Bank of Brazil staff. Typically, IT staff merge, anonymize,
sample and make data available in "Secure Labs". All work must be done in the workstations available in these Labs,
without external access to internet, in business hours, and under the surveillance of local staff. No codes or other
pieces of data can be introduced or retrieved from these workstations if not by IT or speciallized staff. As of today,
the "Secure Labs" are only available at the Sao Paulo, Rio de Janeiro and Brasilia headquarters.  

Central Bank Researchers involved in a cooperation agreement or with a project previously approved by management 
can work data remotely only if they have clearing for each piece of data in the project's scope. 

Section II of the paper provides all other details on the nature of the data, summary and empirical strategy. 
*/
***********************************************************************************************************************

/**********************************************************************************************************************
THIS PACKAGE: 

This package contains two Pseudo data files in Stata (.dta) format, created in Stata 16.1 and three (numbered) do-files
as well as this README.

The first code, 01_Interest-rates, cleans, prepares and runs the diff-in-diff strategy in two monetary policy episodes (easing and tightening). Pseudo DATA is provided to load and code. The outcomes relate to Tables 9 (Summary), 10, 11, 12A and 13A of the paper.

The second code, 02_RRs_comprehensive, cleans, prepares and runs the diff-in-diff strategy in two reserve requirements 
(RR) policy interventions (easing and tightening). The outcomes relats to the comprehensive sample of firms and creates
Table 3 as well as an additional dta for the multiple bank relationship (mbr) firms.

The third code, 03_RRs_mbr, runs the diff-in-diff strategy in the same two RR policy interventions (easing and tightening) but transits between dtas to produce Tables 1 (Summary) 2, 4, 5, 6, 7, 8, 12B and 13B.

It is IMPERATIVE to run the codes in this order for a smooth experience:

01_Interest-rates
02_RRs_comprehensive
03_RRs_mbr

*************************************************************************************************************************
* End*